<template>

	<scroll-view scroll-y="true" class="scroll" :refresher-enabled="refresherEnabled" 
	:refresher-background="bgColor"
		:refresher-triggered="freshing" @refresherrefresh="onRefresh" :style="{backgroundColor: bgColor}">
		<slot></slot>
		<!-- 这个view是为了最后的slot内容中最后的margi不生效 -->
		<view style="height: 1px;"></view>
	</scroll-view>
</template>

<script>
	export default {
		name: "tab-bar-item",
		data() {
			return {

			}
		},
		props: {
			refresherEnabled: {
				default: true,
				type: Boolean
			},
			freshing: {
				default: false,
				type: Boolean
			},

			bgColor: {
				default: "#FaFaFa",
				type: String
			}

		},
		methods: {

			onRefresh() {
				this.$emit("onRefresh")
			},

		},
		watch: {

		},
		created() {

		}
	}
</script>

<style scoped>
	scroll-view.scroll {
		height: 100%;
	}
</style>
